package com.datacloud.controller;

import com.alibaba.fastjson.JSONObject;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

/**
 * 创建人   caizhongrui
 * 创建时间  10:03
 * ==============================================
 * 类说明：
 * <p>
 * ==============================================
 * 修改记录
 * 修改人          修改时间             修改内容
 * 蔡仲瑞          10:03             创建
 * ==============================================
 */

@Controller
@RequestMapping("dataCloud")
public class DataCloudController {
    @RequestMapping(value = "/sendMsg", method = RequestMethod.POST, produces = "application/json; charset=utf-8")
    @ResponseBody
    public String sendMsg(@RequestParam(value = "type", required = true) String type, @RequestParam(value = "msg", required = true) String msg,@RequestParam(value = "source", required = true)  String source){
        JSONObject result = new JSONObject();
        System.out.println("type:" + type + ",msg:"+msg+",source:"+source);
        result.put("success",true);
        result.put("msg","error msg");
        return result.toJSONString();
    }



    @RequestMapping(value = "/callBack", method = RequestMethod.POST, produces = "application/json; charset=utf-8")
    @ResponseBody
    public String callBack(@RequestParam(value = "status", required = true) String status,@RequestParam(value = "id", required = true) String id,@RequestParam(value = "source", required = true) String source){
        JSONObject result = new JSONObject();
        System.out.println("status:" + status + ",id:"+id+",source:"+source);
        result.put("success",true);
        result.put("msg","error msg");
        return result.toJSONString();
    }

}
